//
//  AncdaSession.h
//  AncdaPlayer
//
//  Created by huangzan on 14-5-16.
//  Copyright (c) 2014年 huangzan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AncdaCode.h"

@interface AncdaNode : NSObject

@property(nonatomic,strong) NSString* name;
@property(nonatomic,strong) NSString* key;

@end


@interface AncdaCamera : NSObject

@property(nonatomic,strong) NSString* parent;
@property(nonatomic,strong) NSString* key;
@property(nonatomic,strong) NSString* name;
@property(nonatomic,strong) NSString* x;
@property(nonatomic,strong) NSString* y;
@property(nonatomic) BOOL online;

@end


@protocol AncdaSessionDelegate <NSObject>
-(void) OnAncdaSessionState:(int)state lparam:(long)lparam wparam:(long)wparam;
@end


@interface AncdaSession : NSObject

@property(nonatomic,strong) id<AncdaSessionDelegate> delegate;
@property(nonatomic,strong) NSString* serverAddress;
@property(nonatomic,strong) NSString* userName;
@property(nonatomic,strong) NSString* password;
@property(nonatomic,assign) NSUInteger serverPort;
@property(readonly) void* handle;
@property(readonly) int maxStream;
@property(readonly) unsigned int rightMask;
-(BOOL)login;
-(void)logout;
-(void)refresh;
-(NSArray*)getCamera:(NSString*)key;
-(NSArray*)getNode:(NSString*)key;
@end
